<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>HiBot机器人列表</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="icon" type="image/png" href="assets/i/favicon.png">
<link rel="apple-touch-icon-precomposed"
	href="assets/i/app-icon72x72@2x.png">
<meta name="apple-mobile-web-app-title" content="Amaze UI" />
<link rel="stylesheet" href="assets/css/amazeui.min.css" />
<link rel="stylesheet" href="assets/css/admin.css">
<link rel="stylesheet" href="assets/css/app.css">
<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet"
	href="assets/bootstrap-3.3.7/css/bootstrap.min.css">
<script src="assets/js/jquery.min.js"></script>
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="assets/bootstrap-3.3.7/js/bootstrap.min.js"></script>
<script src="assets/js/table.js"></script>
<script type="text/javascript">
	jQuery(document).ready(function($) {
		GetTableData('#Client', function(id) {
			alert(id)
		});
	});
	jQuery(document).ready(function($) {
		GetTableData('#Task', function(id) {
			alert(id)
		});
	});
</script>

<!-- <script type="text/javascript">
	$(function() {
		$
				.ajax({
					url : "/HiBotServer/api/v1/task/list?startPage=1&pageSize=10",
					type : "get",
					dataType : "json",
					success : function(result) {

						for (var i = 0; i < result.length; i++) {
							var str1 = '<tr><td><input type="checkbox"></td>'
									+ '<td>' + result[i].id + '</td>' + '<td>'
									+ result[i].name + '</td>';
							var str2 = '<td>'
									+ '<div class="am-btn-toolbar">'
									+ '<div class="am-btn-group am-btn-group-xs">'
									+ '<button class="am-btn am-btn-default am-btn-xs am-text-secondary">'
									+ '<span class="am-icon-pencil-square-o"></span> Edit'
									+ '</button>'

									+ '<button class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only">'
									+ '<span class="am-icon-trash-o"></span>Map'
									+ '</button>' + '</div>' + '</div>'
									+ '</td>' + '</tr>';
							$("#modal_body").append(str1 + str2);
						}
					},
					error : function() {
						alert("错误");
					}
				});
	});
</script>  -->
</head>

<body data-type="generalComponents">


	<header class="am-topbar am-topbar-inverse admin-header">
		<div class="am-topbar-brand">
			<a href="javascript:;" class="tpl-logo"> <img
				src="assets/img/logo.png" alt="">
			</a>
		</div>
		<div
			class="am-icon-list tpl-header-nav-hover-ico am-fl am-margin-right">

		</div>

		<button
			class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only"
			data-am-collapse="{target: '#topbar-collapse'}">
			<span class="am-sr-only">导航切换</span> <span class="am-icon-bars"></span>
		</button>
	</header>


	<div class="tpl-page-container tpl-page-header-fixed">


		<div class="tpl-left-nav tpl-left-nav-hover">
			<div class="tpl-left-nav-title">HiBot 菜单</div>
			<div class="tpl-left-nav-list">
				<ul class="tpl-left-nav-menu">
					<li class="tpl-left-nav-item"><a href="index.html"
						class="nav-link active"> <i class="am-icon-home"></i> <span>首页</span>
					</a></li>

					<li class="tpl-left-nav-item"><a href="javascript:;"
						class="nav-link tpl-left-nav-link-list"> <i
							class="am-icon-table"></i> <span>任务管理</span> <i
							class="am-icon-angle-right tpl-left-nav-more-ico am-fr am-margin-right"></i>
					</a> <!-- 打开状态 a 标签添加 active 即可   -->
						<ul class="tpl-left-nav-sub-menu" style="display: block">
							<li>
								<!-- 打开状态 a 标签添加 active 即可   --> <a href="task-distribute.html"
								class="active"> <i class="am-icon-angle-right"></i> <span>任务分发</span>
									<i
									class="am-icon-star tpl-left-nav-content-ico am-fr am-margin-right"></i>
							</a> <a href="task-monitor.html"> <i class="am-icon-angle-right"></i>
									<span>任务监控</span> <i
									class="tpl-left-nav-content tpl-badge-success"> 18 </i> <a
									href="task-control.html"> <i class="am-icon-angle-right"></i>
										<span>任务控制</span> <i
										class="tpl-left-nav-content tpl-badge-primary"> 5 </i>
							</li>
						</ul></li>
				</ul>
			</div>
		</div>


		<div class="tpl-content-wrapper">
			<div class="tpl-content-page-title">HiBot 机器人列表</div>
			<ol class="am-breadcrumb">
				<li><a href="#" class="am-icon-home">首页</a></li>
				<li><a href="#">机器人管理</a></li>
			</ol>
			<div class="tpl-portlet-components">
				
				<div class="tpl-block">
					<div class="am-g">
						<div class="am-u-sm-12 am-u-md-6">
							<div class="am-btn-toolbar">
								<div class="am-btn-group am-btn-group-xs">
									<button type="button"
										class="am-btn am-btn-default am-btn-success"
										data-toggle="modal" data-target="#myModal">
										<span class="am-icon-plus"></span> &nbsp;选择应用
									</button>
									<button type="button"
										class="am-btn am-btn-default am-btn-secondary" onclick="return Distribute()">
										<span class="am-icon-save"></span>&nbsp;应用部署
									</button>
									<button type="button"
										class="am-btn am-btn-default am-btn-danger">
										<span class="am-icon-trash-o"></span>&nbsp;删除机器人
									</button>
								</div>
							</div>
						</div>
						<div class="am-u-sm-12 am-u-md-3">
							<div class="am-form-group">
								<select data-am-selected="{btnSize: 'sm'}">
									<option value="option1">All State</option>
									<option value="option2">Online</option>
									<option value="option3">Offline</option>
								</select>
							</div>
						</div>
						<div class="am-u-sm-12 am-u-md-3">
							<div class="am-input-group am-input-group-sm">
								<input type="text" class="am-form-field"> <span
									class="am-input-group-btn">
									<button
										class="am-btn  am-btn-default am-btn-success tpl-am-btn-success am-icon-search"
										type="button"></button>
								</span>
							</div>
						</div>
					</div>
					<div class="am-g">
						<div class="am-u-sm-12">
							<form class="am-form">
								<table
									class="am-table am-table-striped am-table-hover table-main"
									id="Client"
									data-url="/HiBotServer/api/v1/client/list?startPage=1&pageSize=10">
									<thead>
										<tr>
											<th class="table-check" data-field="checkbox"><input
												type="checkbox" class="tpl-table-fz-check" name="allChecked"
												id="allChecked" onclick="DoCheck()"></th>
											<th class="table-id" data-field="id">ID</th>
											<th class="table-title" data-field="name">Name</th>
											<th class="table-title" data-field="type">Type</th>
											<th class="table-type" data-field="ip">IP</th>
											<th class="table-date am-hide-sm-only" data-field="state">State</th>
											<th class="table-set" data-field="operation">Operation</th>
										</tr>
									</thead>
									<tbody></tbody>
								</table>
								<div class="am-cf">

									<div class="am-fr">
										<ul class="am-pagination tpl-pagination">
											<!--<li class="am-disabled"><a href="#">«</a></li>  -->
											<li class="am-active"><a href="#">1</a></li>
										</ul>
									</div>
								</div>
								<hr>
							</form>
						</div>
					</div>
				</div>
				<div class="tpl-alert"></div>
			</div>
		</div>
	</div>

	<!-- 模态框（Modal） -->
	<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel" aria-hidden="true" style="top: 10%">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="myModalLabel">Task Lists</h4>
				</div>
				<div class="modal-body">
					<div class="am-u-sm-12 am-u-md-3">
						<div class="am-input-group am-input-group-sm">
							<input type="text" class="am-form-field" style="width: 120px;">
							<span class="am-input-group-btn">
								<button
									class="am-btn  am-btn-default am-btn-success tpl-am-btn-success am-icon-search"
									type="button"></button>
							</span>
						</div>
					</div>
					<div class="am-g">
						<div class="am-u-sm-12">
							<form class="am-form">
								<table
									class="am-table am-table-striped am-table-hover table-main"
									id="Task"
									data-url="/HiBotServer/api/v1/task/list?startPage=1&pageSize=10">
									<thead>
										<tr>
											<th class="table-check" data-field="checkbox"><input
												type="checkbox" class="tpl-table-fz-check" name="allChecked"
												id="allChecked" onclick="DoCheck()"></th>
											<th class="table-id" data-field="id">ID</th>
											<th class="table-title" data-field="name">名称</th>
											<th class="table-set" data-field="operation">操作</th>
										</tr>
									</thead>
									<tbody></tbody>
								</table>
								<div class="am-cf">
									<div class="am-fr">
										<ul class="am-pagination tpl-pagination">
											<!--<li class="am-disabled"><a href="#">«</a></li>  -->
											<li class="am-active"><a href="#">1</a></li>
										</ul>
									</div>
								</div>
								<hr>
							</form>
						</div>
					</div>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">Close
					</button>
					<!-- <button type="button" class="btn btn-primary">Submit</button> -->
				</div>
			</div>
			<!-- /.modal-content -->
		</div>
		<!-- /.modal -->
	</div>
	<script src="assets/js/amazeui.min.js"></script>
	<script src="assets/js/app.js"></script>
</body>

</html>